package com.xy.minio;

import io.minio.*;
import io.minio.errors.*;
import io.minio.http.Method;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

public class FileDownloader {
    public static void main(String[] args) throws NoSuchAlgorithmException, IOException, InvalidKeyException, InvalidResponseException, BucketPolicyTooLargeException, ServerException, InternalException, XmlParserException, InvalidBucketNameException, InsufficientDataException, ErrorResponseException, RegionConflictException {
        MinioClient client = MinioClient
                .builder()
                .endpoint("http://106.12.149.245:9000")
                .credentials("admin", "admin123")
                .build();
        client.downloadObject(DownloadObjectArgs.builder().bucket("test").object("aaa").filename("bbb").build());
    }
}
